﻿using System;
using System.Collections.Generic;

using System.Text;
using yb.commerce.Model;
using yb.commerce.DAL;

namespace yb.commerce.BLL
{
    public class OrderItemBusiness
    {
        public bool Add(OrderItem orderItem)
        {
            return new OrderItemDAO().Add(orderItem);
        }

        public bool Delete(int Id)
        {
            return new OrderItemDAO().Delete(Id);
        }
        public bool Delete(string orderId)
        {
            return new OrderItemDAO().Delete(orderId);
        }

        public bool Update(OrderItem orderItem)
        {
            return new OrderItemDAO().Update(orderItem);
        }

        public OrderItem GetEntity(int Id)
        {
            return new OrderItemDAO().GetEntity(Id);
        }

        public DataRecordTable GetList(string fieldList, string orderField, bool orderBy, int pageIndex, int pageSize, string where)
        {
            return new OrderItemDAO().GetList(fieldList,orderField,orderBy,pageIndex,pageSize,where);
        }
        public DataRecordTable GetList2(string fieldList, string orderField, bool orderBy, int pageIndex, int pageSize, string where)
        {
            return new OrderItemDAO().GetList2(fieldList, orderField, orderBy, pageIndex, pageSize, where);
        }
        public bool UpdateIsComment(bool isComment, int id)
        {
            return new OrderItemDAO().UpdateIsComment(isComment,id);
        }
        public int GetCommentNumByOrderNo(string orderNo,bool isComment)
        {
            return new OrderItemDAO().GetCommentNumByOrderNo(orderNo,isComment);
        }
    }
}
